//
//  GLESPrim.h
//  DrawColorPolygon
//
//  Created by 畑圭輔 on 10/03/07.
//  Copyright 2010 Keisuke Hata. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>

#import <OpenGLES/EAGL.h>
#import <OpenGLES/EAGLDrawable.h>
#import <Foundation/Foundation.h>
#import <OpenGLES/ES1/gl.h>

#define _RGBA( r,g,b,a ) r,g,b,a

@protocol EAGLDrawableDelegate

@required
- (void) draw;

@end

@interface EAGLPrim : NSObject
{
	int mode;
}
@property (nonatomic,readwrite) int mode;

@end

/* --------------------------------------------------- */
/* 線を描画 */
/* --------------------------------------------------- */
@interface EAGLPoly : EAGLPrim<EAGLDrawableDelegate>
{
}
- (void) draw;

@end

/* --------------------------------------------------- */
/* 線を描画 */
/* --------------------------------------------------- */
@interface EAGLLine : EAGLPrim<EAGLDrawableDelegate>
{
	int lineWidth;
	BOOL lineSmooth;
}
- (void) draw;

@property (nonatomic,readwrite) int lineWidth;
@property (nonatomic,readwrite) BOOL lineSmooth;

@end
